import request from '@/utils/request'

// 列表
export const materialPageList = (data) => {
  return request({
    url: `/code-material/page-list`,
    method: 'post',
    data
  })
}

// 新增
export const materialAdd = (data) => {
  return request({
    url: `/code-material/add`,
    method: 'post',
    data
  })
}

// 修改
export const materialModify = (data) => {
  return request({
    url: `/code-material/modify`,
    method: 'post',
    data
  })
}

// 删除
export const materialDel = (id) => {
  return request({
    url: `/code-material/delete/${id}`,
    method: 'post'
  })
}

// 导入
export const materialImport = (data) => {
  return request({
    url: `/code-material/import`,
    method: 'post',
    data
  })
}






export function getdepartement(query) {
  return request({
    url: `/mop_groups/query`,
    method: 'get',
    params: query
  })
}
export function adddepartement(data) {
  return request({
    url: `/mop_groups`,
    method: 'post',
    data
  })
}
export function updatedepartement(id, data) {
  return request({
    url: `/mop_groups/${id}`,
    method: 'put',
    data
  })
}
export function deldepartement(id) {
  return request({
    url: `/mop_groups/${id}`,
    method: 'delete'

  })
}
